using UnityEngine;
namespace RGuang.PlathformCtrl
{
    public class Gate : MonoBehaviour
    {
        [SerializeField] VoidEventChannel gateTriggerEventChannel;
        private void OnEnable()
        {
            gateTriggerEventChannel.AddListener(Open);

        }
        private void OnDisable()
        {

            gateTriggerEventChannel.RemoveListener(Open);
        }
        void Open()
        {
            Destroy(gameObject);
        }

    }

}
